// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: {
    enabled: true,

    timeline: {
      enabled: true,
    },
  },
  // nitro:{
  //   externals:{
  //     inline:['uuid']
  //   }
  // },
  hooks: {
    'build:done': async () => {
      const { default: myExtractStyle } = await import('./hooks/antd');
      await myExtractStyle();
    },
  },
  // 运行时的全局配置
  runtimeConfig:{
    public:{
      title:process.env.NUXT_MY_APP_TITLE,
      baseURL:process.env.NUXT_MY_APP_REQUET_HTTP_BASE_URL
    }
  },

  app:{
    pageTransition: { name: 'fade', mode: 'out-in' },
    head:{
      link:[
        { rel: 'stylesheet', href: '/css/antd.css' },
        {rel: 'stylesheet', href: '/css/markdown.css'},
      ],
      meta: [
        { 
          'http-equiv': 'Content-Security-Policy', 
          content: 'upgrade-insecure-requests' 
        },{
          name:"referrer",
          content:"no-referrer"
        }
      ],
    },
  },
  plugins:[
    "~/plugins/antd-ui.ts",
    "~/plugins/markdown.ts",
  ],

  modules: ["@nuxt/image"],
})